<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<video id="IVideo">
    <source src="movie.ogg">
</video>
<hr>
<button id="switch">全屏</button>

<script>
    let IVideo = document.getElementById('IVideo');

    document.getElementById('switch').onclick =function () {
        // let Width = document.body.offsetWidth;
        // let Height = document.body.offsetHeight;
        IVideo.width=1920;
        IVideo.height=1080;
    }
</script>
</body>
</html>